package com.yj.suncity.bean;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;

public class OfferDetailListBean {
	private String success;// ": "1",
	private String msg;// ": "获取信息成功",
	private JSONObject data;// ": {

	private String userid = "";// ": "27c19669-6d28-4c8e-9027-709d97da4954",
	private String entname = "";// ": "gongsi1",
	private String ent_logo = "";// ": "/upload/201504/19/201504191215098670.png",
	private String ent_jianjie = "";// ": "shangjiajianjie",
	private String ent_subname = "";// ": "",
	private String ent_address = "";// ": "lianxidizhi",
	private String ent_contact = "";// ": "lianxiren",
	private String ent_contact_tel = "";// ": "18903403733",
	private String ent_weblink = "";// ": "",
	private String legal_person = "";// ": "faren",
	private String hold_num = "";// ": "11",
	private String see_num = "";// ": "1",
	private String dh_num = "";// ": "1",
	private String dg_num = "";// ": "1",
	private String dhgoodssurplus = "";// ": "1",
	private String dggoodssurplus = "";// ": "1",
	private List<OfferDetailGoodsBean> goods_img;// ": [
	private List<OfferDetailOfferBean> offer;// ": [

	public OfferDetailListBean(JSONObject json) {
		this.success = json.optString("success");
		this.msg = json.optString("msg");
		this.data = json.optJSONObject("data");
		this.goods_img = new ArrayList<OfferDetailGoodsBean>();
		this.offer = new ArrayList<OfferDetailOfferBean>();
		if (data != null) {

			this.userid = data.optString("userid");
			this.entname = data.optString("entname");
			this.ent_logo = data.optString("ent_logo");
			this.ent_jianjie = data.optString("ent_jianjie");
			this.ent_subname = data.optString("ent_subname");
			this.ent_address = data.optString("ent_address");
			this.ent_contact = data.optString("ent_contact");
			this.ent_contact_tel = data.optString("ent_contact_tel");
			this.ent_weblink = data.optString("ent_weblink");
			this.legal_person = data.optString("legal_person");
			this.hold_num = data.optString("hold_num");
			this.see_num = data.optString("see_num");
			this.dh_num = data.optString("dh_num");
			this.dg_num = data.optString("dg_num");
			this.dhgoodssurplus = data.optString("dhgoodssurplus");
			this.dggoodssurplus = data.optString("dggoodssurplus");
			
			JSONArray array=data.optJSONArray("goods_img");
			if (array!=null) {
				for (int i = 0; i < array.length(); i++) {
					JSONObject item=array.optJSONObject(i);
					if (item!=null) {
						this.goods_img.add(new OfferDetailGoodsBean(item));
					}
				}
			}
			
			JSONArray array1=data.optJSONArray("offer");
			if (array1!=null) {
				for (int i = 0; i < array1.length(); i++) {
					JSONObject item=array1.optJSONObject(i);
					if (item!=null) {
						this.offer.add(new OfferDetailOfferBean(item));
					}
				}
			}
			
			
		}
	}

	public String getSuccess() {
		return success;
	}

	public String getMsg() {
		return msg;
	}

	public JSONObject getData() {
		return data;
	}

	public String getUserid() {
		return userid;
	}

	public String getEntname() {
		return entname;
	}

	public String getEnt_logo() {
		return ent_logo;
	}

	public String getEnt_jianjie() {
		return ent_jianjie;
	}

	public String getEnt_subname() {
		return ent_subname;
	}

	public String getEnt_address() {
		return ent_address;
	}

	public String getEnt_contact() {
		return ent_contact;
	}

	public String getEnt_contact_tel() {
		return ent_contact_tel;
	}

	public String getEnt_weblink() {
		return ent_weblink;
	}

	public String getLegal_person() {
		return legal_person;
	}

	public String getHold_num() {
		return hold_num;
	}

	public String getSee_num() {
		return see_num;
	}

	public String getDh_num() {
		return dh_num;
	}

	public String getDg_num() {
		return dg_num;
	}

	public String getDhgoodssurplus() {
		return dhgoodssurplus;
	}

	public String getDggoodssurplus() {
		return dggoodssurplus;
	}

	public List<OfferDetailGoodsBean> getGoods_img() {
		return goods_img;
	}

	public List<OfferDetailOfferBean> getOffer() {
		return offer;
	}

}
